﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditNewsMaterial.aspx.cs" Inherits="ZLCMS.Web.SystemManage.Weixin.EditNewsMaterial"  ValidateRequest="False" %>

<%@ Import Namespace ="ZLCMS.Business.Util" %>

<style type="text/css">
    .grid .gridTbody td div {height:auto;}
</style>

<form id="pageForm" method="post" runat="Server" class="pageForm required-validate"
    onsubmit="return validateCallback(this, navTabAjaxDone);" action="/SystemManage/Weixin/Material/EditNewsMaterial.aspx">
    
<div class="pageContent" layoutH="36">
    <div class="pageFormContent">
        <dl class="nowrap">
            <dt>素材分类：</dt>
            <dd><%= ParamKit.GetValue("WXMaterialType", "news", "&nbsp;")%></dd>
        </dl>
        <dl class="nowrap">
            <dt>名称：</dt>
            <dd><asp:TextBox ID="tb_name" Width="450px" runat="server"></asp:TextBox>
        </dl>
        <dl class="nowrap">
            <dt>注意：</dt>
            <dd>（图文消息个数限制为10条以内；多条图文消息信息，默认第一条项目为大图。）</dd>
        </dl>
	</div>

<% if (!string.IsNullOrEmpty(_uid))
{
%>
    <div class="panelBar">
	    <ul class="toolBar">
            <li><a class="add" href='/SystemManage/Weixin/Material/EditNewsMaterialItem.aspx?mid=<%= _uid %>' target="dialog" rel="addmatnewsitem" title="增加图文素材"
            max="false" mask="true" maxable="false" minable="false" width="800" height="550"><span>添加</span></a></li>
	    </ul>
    </div>
    
    <table class="table" width="100%">
        <thead>
		    <tr>
			    <th width="5%">编号</th>
			    <th width="25%" align="center">图片</th>
			    <th width="20%">消息标题</th>
			    <th width="30%">消息描述</th>
			    <th width="5%">排序</th>
			    <th width="15%">管理</th>
		    </tr>
	    </thead>
	    <tbody>
            <asp:repeater runat="server" id="grid">
                <ItemTemplate>
		        <tr target="uid" rel='<%# Eval("Id")%>'>
			        <td><%# Eval("Id")%></td>
			        <td>
                        <img src="<%# FileKit.FirstFilePath(Eval("PicUrl").ToString()) %>" style='width:<%# Container.ItemIndex == 0 ? "200px" : "80px"%>; margin:5px' alt=""/>
                    </td>
			        <td><%# Eval("Title")%></td>
			        <td><%# Eval("Description")%></td>
			        <td><%# Eval("ShowOrder")%></td>
			        <td> 
			            <a href="/SystemManage/Weixin/Material/EditNewsMaterialItem.aspx?mid=<%= _uid %>&uid=<%# Eval("Id")%>" target="dialog" title="修改图文素材" 
			            rel="editparamgroupexp" max="false" mask="true" maxable="false" minable="false" width="800" height="550">修改</a>&nbsp;&nbsp;
			            <a href="/SystemManage/Weixin/Material/DeleteNewsMaterialItem.aspx?ids=<%# Eval("Id")%>" target="ajaxTodo" title="请确定要删除" warn="请选择一项">删除</a>
			        </td>
		        </tr>
                </ItemTemplate>
            </asp:repeater>
	    </tbody>
    </table>
<%
}
 %>
</div>

    <div class="formBar">
		<ul>
            <li><div class="buttonActive"><div class="buttonContent"><button type="submit"><%= string.IsNullOrEmpty(_uid) ? "下一步" : "保存"%></button></div></div></li>
			<li>
				<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
			</li>
		</ul>
	</div>
</form>

